package com.lcs.springcloud.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.stereotype.Service;

@Service
public class HelloService {

    @SentinelResource(value = "getUser", blockHandler = "error")
    public String getUser()
    {
        return "user";
    }
    public String error(BlockException e)
    {
        return "error";
    }
}
